<?php include './application/views/common/zhs_header.php';?>
<?php include './application/views/common/zhs_usercenter_acnt.php';?>
<div class="inv_box w">
<?php include './application/views/common/zhs_usercenter_left.php';?>
  <div class="membd_right">
    <div class="zjbd_top">
      <dl>
        <dt>代金券总额 <br>
		<span><img src="<?php echo CON_STATIC_URL; ?>zhsjr/images/con_22.gif"></span> ￥<?php echo ($red_money+$accou_sum);?>元</dt>
        <dt>已用代金券 <br>
		￥<?php echo $accou_sum;?>元<span><img src="<?php echo CON_STATIC_URL; ?>zhsjr/images/con_22.gif"></span> </dt>
		<dt>可用代金券  <br>
		￥<?php echo $red_money;?>元<span><img src="<?php echo CON_STATIC_URL; ?>zhsjr/images/con_22.gif"></span> </dt>
		<dt style="border-right:none;">已过期代金券<br>
		￥0.00元<span><img src="<?php echo CON_STATIC_URL; ?>zhsjr/images/con_22.gif"></span></dt>
      </dl>
    </div>
   <div class="xq_body pt">
            <table class="djbd_tab">
      <thead>
        <tr>
          <th width="187" height="38">代金券面值（元） </th>
          <th width="90">已用（元）</th>
          <th width="89">待用（元）</th>
          <th width="89">类型</th>
          <th width="97">赠送时间 </th>
          <th width="104">过期时间</th>
          <th width="102">状态</th>
        </tr>
      </thead>
      <tbody>
      <?php $shengyu = $accou_sum;
      	$rank = "未使用";
      foreach($accountlog_list0 as $val){?>
        <tr>
          <td height="44">￥<?php echo $val['money']?></td>
          <td>￥<?php if($shengyu == 0.00){echo 0;$dai=$val['money'];$rank = "未使用";}elseif($val['money'] >= $shengyu){echo $shengyu; $rank = "使用"; $dai =$val['money']-$shengyu; $shengyu=0.00;}  else { echo $val['money'];$shengyu = $shengyu-$val['money'];$rank = "使用";$dai=0;}?> </td>
          <td>￥<?php  echo $dai;?> </td>
          <td><?php echo $val['remark']?></td>
          <td><?php echo date('Y-m-d',$val['add_time']);?></td>
          <td><?php  $showtime=date("Y-m-d H:i:s",$val['add_time']);  echo date('Y-m-d',strtotime($showtime . '+15 year'));?></td>
          <td><?php echo $rank;?></td>
        </tr>
        <?php }?>
      </tbody>
    </table>
     	<div class="invbd_page">
     		<?php echo $this->pagination->create_links();?>
     	</div>
        </div>
        
      <h4 class="txbd_tsbd">我的代金券常见问题<br>
1、什么是代金券？<br>
代金券是一点投推出的一种现金抵用券，可以在投资中抵用同等的现金。<br>
2、代金券如何获得？<br>
注册、实名认证、推荐好友、其他活动都可以获得面值不等的代金券。<br>
3、如何使用代金券？<br>
代金券使用方法:每次成功投标均可激活投标金额的0.5%（以1元为最小单位，如：投资200元，激活现金1元；投资10万元，激活现金500元）
返还到用户账号，有效期：15年。<br>
</h4>
  </div>
</div> 

<?php include './application/views/common/zhs_footer.php';?>
<?php include './application/views/common/zhs_right.php';?>
